﻿using Application.AppService.IConfig;
using AutoMapper;
using Domain;
using Domain.Entity.Config;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Mvc;

namespace UI.Controllers.MoKuaiYi_第一个模块_.resume_management_简历管理_
{
    public class ERSController : Controller
    {
        private readonly IMapper mapper;
        private readonly IEngage_resumeAppService eRAppService;

        public ERSController(IMapper mapper,IEngage_resumeAppService eRAppService)
        {
            this.mapper = mapper;
            this.eRAppService = eRAppService;
        }
        public IActionResult Index()
        {
            return View();
        }
        public IActionResult Index1()
        {
            return View();
        }
        public IActionResult Index2()
        {
            return View();
        }
        [HttpPost("FYERS")]
        public IActionResult FYERS(string Human_major_kind_id, string Human_major_id, string gzc, DateTime startDate, DateTime endDate, int page, int pageSize)
        {
            ERFenYE erFenYE = eRAppService.DateERAsync(Human_major_kind_id, Human_major_id, gzc, startDate, endDate, page, pageSize, 1);
            return Json(erFenYE);
        }
        [HttpPost("UpdateER")]
        public async Task<IActionResult> UpdateER(Engage_resume er)
        {
            bool rs = await eRAppService.UpdateERAsync(er);
            return Json(rs);
        }
    }
}
